package com.huawei.appmarket.service.store.awk.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.appgallery.foundation.ui.framework.widget.Space;
import com.huawei.appmarket.service.store.awk.card.ProductListCard;
import o.cdr;
import o.cgz;
import o.cih;
import o.ewm.h;

public class ProductListNode extends cdr {
    public ProductListNode(Context context) {
        super(context, 1);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -1);
        layoutParams.weight = 1.0f;
        int ˏ = ˏ();
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        for (int i = 0; i < ˏ; i++) {
            View spaceEx;
            if (i != 0) {
                spaceEx = new Space(this.ॱ);
                spaceEx.setLayoutParams(new LinearLayout.LayoutParams(this.ˋ, -1));
                viewGroup.addView(spaceEx);
            }
            spaceEx = from.inflate(ˎ(), null);
            spaceEx.setLayoutParams(layoutParams);
            cih ˏ2 = ˏ(this.ॱ);
            ˏ2.ˏ(spaceEx);
            ˊ(ˏ2);
            viewGroup.addView(spaceEx);
        }
        return true;
    }

    protected int ˎ() {
        return h.ˈॱ;
    }

    protected cgz ˏ(Context context) {
        return new ProductListCard(context);
    }
}
